package com.API;

import java.util.Scanner;

public class Test04 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String s = sc.nextLine();

        int daXie = 0, xiaoXei = 0, shuZi = 0;
        int length = s.length();
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) >= 'A' && s.charAt(i) <= 'Z') {
                System.out.print(s.charAt(i) + " ");
                daXie++;
            } else if (s.charAt(i) >= 'a' && s.charAt(i) <= 'z') {
                System.out.print(s.charAt(i) + " ");
                xiaoXei++;
            } else if (s.charAt(i) >= '0' && s.charAt(i) <= '9') {
                System.out.print(s.charAt(i) + " ");
                shuZi++;

            }
        }
        System.out.println("大写"+daXie);
        System.out.println("小写"+xiaoXei);
        System.out.println("数字"+shuZi);
    }
}
